home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / s-expgen.ads < prev    next >
Text File  |  1996-01-30  |  3KB  |  51 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUNTIME COMPONENTS                          --
  4. --                                                                          --
  5. --                       S Y S T E M . E X P _ G E N                         --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.7 $                              --
  10. --                                                                          --
  11. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  12. --                                                                          --
  13. -- The GNAT library is free software; you can redistribute it and/or modify --
  14. -- it under terms of the GNU Library General Public License as published by --
  15. -- the Free Software  Foundation; either version 2, or (at your option) any --
  16. -- later version.  The GNAT library is distributed in the hope that it will --
  17. -- be useful, but WITHOUT ANY WARRANTY;  without even  the implied warranty --
  18. -- of MERCHANTABILITY  or  FITNESS FOR  A PARTICULAR PURPOSE.  See the  GNU --
  19. -- Library  General  Public  License for  more  details.  You  should  have --
  20. -- received  a copy of the GNU  Library  General Public License  along with --
  21. -- the GNAT library;  see the file  COPYING.LIB.  If not, write to the Free --
  22. -- Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.        --
  23. --                                                                          --
  24. ------------------------------------------------------------------------------
  25.  
  26. --  This package contains the generic functions which are instantiated with
  27. --  predefined integer and real types to generate the runtime exponentiation
  28. --  functions called by expanded code generated by Expand_Op_Expon. This
  29. --  version of the package contains routines that are compiled with overflow
  30. --  checks enabled, so they are called for exponentiation operations which
  31. --  require overflow checking
  32.  
  33. package System.Exp_Gen is
  34. pragma Pure (System.Exp_Gen);
  35.  
  36.    --  Exponentiation for float types (checks on)
  37.  
  38.    generic
  39.       type Type_Of_Base is digits <>;
  40.    function Exp_Float_Type
  41.      (Left : Type_Of_Base; Right : Integer) return Type_Of_Base;
  42.  
  43.    --  Exponentiation for signed integer types (checks on)
  44.  
  45.    generic
  46.       type Type_Of_Base is range <>;
  47.    function Exp_Integer_Type
  48.      (Left : Type_Of_Base; Right : Natural) return Type_Of_Base;
  49.  
  50. end System.Exp_Gen;
  51.